<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>高效学习管家</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
    <style>
        :root {
            --primary-color: #6C5CE7;
            --secondary-color: #A8A4FF;
            --background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            --card-bg: rgba(255, 255, 255, 0.9);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background: var(--background);
            min-height: 100vh;
            padding: 2rem;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 2rem;
        }

        .card {
            background: var(--card-bg);
            border-radius: 15px;
            padding: 1.5rem;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease;
        }

        .card:hover {
            transform: translateY(-5px);
        }

        h1 {
            text-align: center;
            color: var(--primary-color);
            margin-bottom: 2rem;
            font-size: 2.5em;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
        }

        .section-title {
            color: var(--primary-color);
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .input-group {
            margin-bottom: 1rem;
            display: flex;
            gap: 0.5rem;
        }

        input, textarea {
            flex: 1;
            padding: 0.8rem;
            border: 2px solid #eee;
            border-radius: 8px;
            transition: border-color 0.3s ease;
        }

        input:focus, textarea:focus {
            outline: none;
            border-color: var(--primary-color);
        }

        button {
            background: var(--primary-color);
            color: white;
            border: none;
            padding: 0.8rem 1.5rem;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.3s ease;
        }

        button:hover {
            background: #5B4BC4;
        }

        .content-list {
            margin-top: 1rem;
        }

        .todo-item, .memo-item {
            background: white;
            padding: 1rem;
            margin-bottom: 0.5rem;
            border-radius: 8px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .delete-btn {
            color: #ff4757;
            cursor: pointer;
            padding: 0.3rem;
        }

        .achievement-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1rem;
        }

        .achievement-item {
            aspect-ratio: 1;
            background: #fff;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2em;
            color: var(--primary-color);
        }
    </style>
</head>
<body>
<h1>🎯 高效学习管家</h1>
<div class="container">
    <!-- 待办事项 -->
    <div class="card">
        <h2 class="section-title"><i class="fas fa-tasks"></i>学习任务</h2>
        <div class="input-group">
            <input type="text" id="todoInput" placeholder="添加新任务...">
            <button onclick="addTodo()">添加</button>
        </div>
        <div class="content-list" id="todoList"></div>
    </div>

    <!-- 备忘录 -->
    <div class="card">
        <h2 class="section-title"><i class="fas fa-book"></i>学习笔记</h2>
        <div class="input-group">
            <textarea id="memoInput" rows="3" placeholder="记录学习笔记..."></textarea>
            <button onclick="addMemo()">添加</button>
        </div>
        <div class="content-list" id="memoList"></div>
    </div>

    <!-- 错题本 -->
    <div class="card">
        <h2 class="section-title"><i class="fas fa-exclamation-circle"></i>错题记录</h2>
        <div class="input-group">
            <input type="text" id="questionInput" placeholder="错题题目">
            <input type="text" id="answerInput" placeholder="正确答案">
            <button onclick="addQuestion()">添加</button>
        </div>
        <div class="content-list" id="questionList"></div>
    </div>

    <!-- 成果展示 -->
    <div class="card">
        <h2 class="section-title"><i class="fas fa-trophy"></i>学习成果</h2>
        <div class="achievement-grid" id="achievementGrid">
            <div class="achievement-item">📚</div>
            <div class="achievement-item">🎨</div>
            <div class="achievement-item">💡</div>
        </div>
    </div>
</div>

<script>
    // 待办事项功能
    function addTodo() {
        const input = document.getElementById('todoInput');
        if (!input.value) return;

        const todoItem = document.createElement('div');
        todoItem.className = 'todo-item';
        todoItem.innerHTML = `
                <span>${input.value}</span>
                <i class="fas fa-trash delete-btn" onclick="this.parentElement.remove()"></i>
            `;

        document.getElementById('todoList').appendChild(todoItem);
        input.value = '';
    }

    // 备忘录功能
    function addMemo() {
        const input = document.getElementById('memoInput');
        if (!input.value) return;

        const memoItem = document.createElement('div');
        memoItem.className = 'memo-item';
        memoItem.innerHTML = `
                <p>${input.value.replace(/\n/g, '<br>')}</p>
                <i class="fas fa-trash delete-btn" onclick="this.parentElement.remove()"></i>
            `;

        document.getElementById('memoList').appendChild(memoItem);
        input.value = '';
    }

    // 错题本功能
    function addQuestion() {
        const question = document.getElementById('questionInput');
        const answer = document.getElementById('answerInput');
        if (!question.value || !answer.value) return;

        const questionItem = document.createElement('div');
        questionItem.className = 'todo-item';
        questionItem.innerHTML = `
                <div>
                    <strong>题目：</strong>${question.value}<br>
                    <strong>答案：</strong>${answer.value}
                </div>
                <i class="fas fa-trash delete-btn" onclick="this.parentElement.remove()"></i>
            `;

        document.getElementById('questionList').appendChild(questionItem);
        question.value = '';
        answer.value = '';
    }
</script>
</body>
</html>